<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>添加</title>
    <link rel="stylesheet" href="../css/login.css"/>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">

</head>


<style>
    body{
        background-image: url("../images/w3.jpg");
        background-size:contain;
        background-size:cover;
        background-repeat:no-repeat;
    }
    table
    {
        border-collapse:collapse;
    }
    table, td
    {
        border:1px solid green;
    }
    td
    {
        padding:15px;
    }

</style>
<body >
<div align="center">
    <h1>订单添加</h1>
    <form  name="form" method="post" action="addom"  onsubmit="return userCheck()" >
        <table>
            <tr>
                <td>订单年级：</td>
                <td><input name="ograde" type="text" placeholder="订单年级"/></td>
            </tr>
            <tr>
                <td>订单科目：</td>
                <td><input name="oproject" type="text" placeholder="订单科目"/></td>
            </tr>
            <tr>
                <td>每小时价格：</td>
                <td><input name="price" type="text" placeholder="每小时价格"/></td>
            </tr>

            <tr>
                <td>子女用户名：</td>
                <td><input name="sname" type="text" placeholder="子女用户名"/></td>
            </tr>

            <tr>

                <td colspan="2" align="center"><input type="submit" value="提交"/></td>
            </tr>

        </table>

    </form>
</div>
<script type="text/javascript">
    function userCheck(){
        if(document.form.ograde.value==""){
            window.alert("请输入订单年级");
            return false;
        }if(document.form.oproject.value==""){
            window.alert("请输入订单科目");
            return false;
        }if(document.form.price.value==""){
            window.alert("请输入每小时价格");
            return false;
        }if(document.form.sname.value==""){
            window.alert("请输入子女用户名");
            return false;
        }

        return true;
    }
</script>

</body>
</html>